#include <iostream>
#include <climits>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
char s[30];
char ss[62506];
int main(){
//	freopen("P1042_2.in","r",stdin);
//	freopen("ans.txt","w",stdout);
	int len=0;
	int w=0,l=0;
	while(cin>>ss[len]&&s[len]!='E'){
		len++;
	}
	for(int i=0;i<len;i++){
		if(ss[i]=='W') w++;
		else if(ss[i]=='L') l++;
		else if(ss[i]=='E'){
			cout<<w<<":"<<l<<endl;
			break;
		}
		if(w>=11 || l>=11){
			if(fabs(w-l)>=2){
				cout<<w<<":"<<l<<endl;
				w=0;
				l=0;
			}
		}
	}
	cout<<endl;
	w=0;
	l=0;
	for(int i=0;i<len;i++){
		if(ss[i]=='W') w++;
		else if(ss[i]=='L') l++;
		else if(ss[i]=='E'){
			cout<<w<<":"<<l<<endl;
			break;
		}
		if(w>=21 || l>=21 ){
			if(fabs(w-l)>=2){
				cout<<w<<":"<<l<<endl;
				w=0;
				l=0;
			}
		}
	}
	return 0;
}
